package com.service.loanimpl;

import com.dao.LoanMapper;
import com.model.Loan;
import com.service.LoanService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 编写者：梁颖
 * 编写时间：2019-5-29
 * 类模块描述：查询及相关增删改
 */
@Service
public class LoanServiceImpl implements LoanService {
    @Autowired
    private LoanMapper loanMapper;
    @Override
    public Loan selectByPrimaryKey(int lid){
        System.out.println("输入的参数为："+lid);
        return loanMapper.selectByPrimaryKey(lid);}

    @Override
    public List<Loan> getAllLoan() {
        return loanMapper.getAllLoan();
    }
    //删除
    @Override
    public int delLoan(Integer lid) {
        return loanMapper.delLoan(lid);
    }
    //新增
    @Override
    public int insertLoan(Loan loanmodel) {
        return loanMapper.insertLoan(loanmodel);
    }
}
